package com.string;

/**
 * @ClassName StringTest
 * @Date 2021/9/13 8:30
 * @Author 李明杰
 * @Description
 */

public class StringTest {
    public static void main(String[] args) {
        String str = "123456789";
        char c[] = str.toCharArray();
        for (int i = 0; i < c.length; i++)
            System.out.println("转为数组输出:" + c[i]);

        String s = new String(c);
        System.out.println(s);
        StringBuilder stringBuilder = new StringBuilder("123456789");
        System.out.println(stringBuilder.reverse());
    }
}
